package com.lemon.test;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

import com.lemon.pay.wechat.WXPayConfig;

/**
 * 
 * @author jiangqk
 * @data 2018年4月11日 下午4:48:07
 */
public class MyWechatConfig implements WXPayConfig {
	
	private byte[] certData;

    public MyWechatConfig() throws Exception {
        String certPath = "/path/to/apiclient_cert.p12";
        File file = new File(certPath);
        InputStream certStream = new FileInputStream(file);
        this.certData = new byte[(int) file.length()];
        certStream.read(this.certData);
        certStream.close();
    }

	public String getAppID() {
		return null;
	}

	public String getMchID() {
		return null;
	}

	public String getKey() {
		return null;
	}

	public InputStream getCertStream() {
		ByteArrayInputStream certBis = new ByteArrayInputStream(this.certData);
        return certBis;
	}

	public int getHttpConnectTimeoutMs() {
		return 8000;
	}

	public int getHttpReadTimeoutMs() {
		return 10000;
	}

}
